//    Copyright (C) Kherty.  All rights reserved.
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Tokens
{
    struct FormulaReadContext
    {
        private readonly BinaryReader _reader;
        private readonly FormulaReadContextType _type;
        public Stream BaseStream
        {
            get
            {
                return _reader.BaseStream;
            }
        }

        public FormulaReadContext(BinaryReader reader, FormulaReadContextType type)
        {
            _reader = reader;
            _type = type;
        }

        public FormulaReadContextType Type
        {
            get { return _type; }
        }

        public BinaryReader Reader
        {
            get { return _reader; }
        }

        public ushort ReadUInt16()
        {
            return _reader.ReadUInt16();
        }

        public ulong ReadUInt64()
        {
            return _reader.ReadUInt64();
        }

        public byte[] ReadBytes(int length)
        {
            return _reader.ReadBytes(length);
        }

        public byte ReadByte()
        {
            return _reader.ReadByte();
        }

        public bool ReadBoolean()
        {
            return _reader.ReadBoolean();
        }

        public uint ReadUInt32()
        {
            return _reader.ReadUInt32();
        }

        public int ReadInt32()
        {
            return _reader.ReadInt32();
        }

        public double ReadDouble()
        {
            return _reader.ReadDouble();
        }
    }
}